home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Database Designers / Rational Rose 2000 / Rational Setup.EXE / common / lib / ExtUtils / MM_OS2.pm < prev    next >
Text File  |  1999-01-25  |  2KB  |  86 lines

  1. package ExtUtils::MM_OS2;
  2.  
  3. #use Config;
  4. #use Cwd;
  5. #use File::Basename;
  6. require Exporter;
  7.  
  8. Exporter::import('ExtUtils::MakeMaker',
  9.        qw( $Verbose &neatvalue));
  10.  
  11. unshift @MM::ISA, 'ExtUtils::MM_OS2';
  12.  
  13. sub dlsyms {
  14.     my($self,%attribs) = @_;
  15.  
  16.     my($funcs) = $attribs{DL_FUNCS} || $self->{DL_FUNCS} || {};
  17.     my($vars)  = $attribs{DL_VARS} || $self->{DL_VARS} || [];
  18.     my($imports)  = $attribs{IMPORTS} || $self->{IMPORTS} || {};
  19.     my(@m);
  20.     (my $boot = $self->{NAME}) =~ s/:/_/g;
  21.  
  22.     if (not $self->{SKIPHASH}{'dynamic'}) {
  23.     push(@m,"
  24. $self->{BASEEXT}.def: Makefile.PL
  25. ",
  26.      '    $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e \'use ExtUtils::Mksymlists; \\
  27.      Mksymlists("NAME" => "', $self->{NAME},
  28.      '", "DLBASE" => "',$self->{DLBASE},
  29.      '", "DL_FUNCS" => ',neatvalue($funcs),
  30.      ', "IMPORTS" => ',neatvalue($imports),
  31.      ', "VERSION" => "',$self->{VERSION},
  32.      '", "DL_VARS" => ', neatvalue($vars), ');\'
  33. ');
  34.     }
  35.     join('',@m);
  36. }
  37.  
  38. sub replace_manpage_separator {
  39.     my($self,$man) = @_;
  40.     $man =~ s,/+,.,g;
  41.     $man;
  42. }
  43.  
  44. sub maybe_command {
  45.     my($self,$file) = @_;
  46.     $file =~ s,[/\\]+,/,g;
  47.     return $file if -x $file && ! -d _;
  48.     return "$file.exe" if -x "$file.exe" && ! -d _;
  49.     return "$file.cmd" if -x "$file.cmd" && ! -d _;
  50.     return;
  51. }
  52.  
  53. sub file_name_is_absolute {
  54.     my($self,$file) = @_;
  55.     $file =~ m{^([a-z]:)?[\\/]}i ;
  56. }
  57.  
  58. sub perl_archive
  59. {
  60.  return "\$(PERL_INC)/libperl\$(LIB_EXT)";
  61. }
  62.  
  63. sub export_list
  64. {
  65.  my ($self) = @_;
  66.  return "$self->{BASEEXT}.def";
  67. }
  68.  
  69. 1;
  70. __END__
  71.  
  72. =head1 NAME
  73.  
  74. ExtUtils::MM_OS2 - methods to override UN*X behaviour in ExtUtils::MakeMaker
  75.  
  76. =head1 SYNOPSIS
  77.  
  78.  use ExtUtils::MM_OS2; # Done internally by ExtUtils::MakeMaker if needed
  79.  
  80. =head1 DESCRIPTION
  81.  
  82. See ExtUtils::MM_Unix for a documentation of the methods provided
  83. there. This package overrides the implementation of these methods, not
  84. the semantics.
  85.  
  86.